# -*- coding:utf-8 -*-
# class ListNode:
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution:
    def FindKthToTail(self, head, k):
        p = head
        i = 1
        while (p):
            i += 1
            p = p.next
            
        i_sub_k = i - k
        
        q = head
        j = 1
        while (q):
            if j == i_sub_k:
                return q
            else:
                j += 1
                q = q.next
            
        # write code here